home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_oth / m2cmp20 / realinou.def < prev    next >
Text File  |  1988-11-19  |  834b  |  34 lines

  1. DEFINITION MODULE RealInOut;
  2.  
  3. (* (C) Copyright 1987,1988 Fitted Software Tools. All rights reserved. *)
  4.  
  5. (*
  6.     This module is an extension of InOut and provides routines
  7.     for reading and writing REAL numbers.
  8.  
  9.     This module does its I/O thru InOut.
  10. *)
  11.  
  12. VAR Done :BOOLEAN;
  13.  
  14. PROCEDURE ReadReal( VAR x :REAL );
  15. (*
  16.     reads a string.
  17.     the string is then converted to a REAL which is returned in x.
  18.  
  19.     a real in the format defined for Modula-2 REAL literals is expected
  20.  
  21.     Done is set to TRUE if a valid REAL number is read.
  22. *)
  23.  
  24. PROCEDURE WriteReal( x: REAL; n: CARDINAL );
  25. (*
  26.     x is written in scientific notation, right justified in a field
  27.     of at least n characters.
  28. *)
  29.  
  30. PROCEDURE ReadLongReal( VAR x :LONGREAL );
  31.  
  32. PROCEDURE WriteLongReal( x: LONGREAL; n: CARDINAL );
  33.  
  34. END RealInOut.